import { ConfigManager } from "../../../com/gengine/resource/ConfigManager";
type int = number;
//class DrugChangeConfig
    
    export  class DrugChangeConfig
    {
        constructor()
        {
            
            this._map = new Map<any, any> /* flash.utils.Dictionary */();
            if (DrugChangeConfig._instance != null) 
            {
                throw new Error(" DailyConfig 单例 ");
            }
            this.init();
            return;
        }

        public init(): void
        {
            var loc1=ConfigManager.instance.getJSONByFileName("t_drug_change_config.json");
            this.write(loc1);
            return;
        }

        /* internal  */write(arg1: Object): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=arg1;
            for(loc1 of loc3) 
            {
                this._map[loc1.id] = true;
            }
            return;
        }

        public hasDrug(arg1: int): Boolean
        {
            return arg1 in this._map;
        }

        public static get instance(): DrugChangeConfig
        {
            if (DrugChangeConfig._instance == null) 
            {
                DrugChangeConfig._instance = new DrugChangeConfig();
            }
            return DrugChangeConfig._instance;
        }

        /* internal */ /* var */_map: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ static /* var */_instance: DrugChangeConfig;
    }
